/*
 * Solution.h
 *
 *  Created on: May 26, 2012
 *      Author: hugo
 */

#ifndef SOLUTION_H_
#define SOLUTION_H_
#include <vector>
#include <queue>
#include "Edge.h"
#include "Instance.h"
using namespace std;
class Solution{
public:
	Solution(Instance*);
	virtual ~Solution();
	void add_edge(Edge*);
	void add_vertex(int);
	Edge* get_edge(int);
	int size();
	float get_value();
	float get_cost();
	float get_prize();
	bool is_better(Edge*);
	bool has_vertex(Vertex*);
	bool has_vertex(int);
	bool has_edge(Edge*);
	bool has_edge(int);
	pair<float,vector<Edge*> > diff(Solution*);
	void apply(pair<float,vector<Edge*> >,Solution*);
	bool is_valid();
	void print();
	void quick_print();
private:
	Instance *instance;
	vector<Edge*> tree;
	float prize;
	float cost;
	int *nodes;
	int *edges;
};

#endif /* SOLUTION_H_ */
